package com.sti.platform.controller;

import java.util.Map;

import javax.servlet.http.WebConnection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.aisino.core.common.JsonPost;
import com.aisino.core.controller.BaseController;
import com.aisino.tools.util.WebConstants;
import com.sti.platform.service.ActService;


@Controller
@RequestMapping("act")
public class ActController extends BaseController{
	@Autowired
	private ActService actService;
	
	@ResponseBody
	@RequestMapping(value="/group")
	public Map get(){
		return super.jsonPost(new JsonPost(){
			public void doInstancePost(Map map){				
				map.put(WebConstants.JSON_MESSAGE, actService.addGroup());
			}
		});
	}
	
	@RequestMapping(value="/add/process")
	@ResponseBody
	public Map addProcess(){
		return super.jsonPost(new JsonPost(){
			public void doInstancePost(Map map){				
				actService.createDeployment();
			}
		});
	}

}
